package com.maisuiit.pattern.singleton;

/**
 * @author zhangcc
 * @date 2021-07-13
 */
public class SingletonThree {

    public SingletonThree() {
        System.out.println("私有SingletonThree构造参数初始化");
    }

    public static class SingletonClassInstance {
        private static final SingletonThree singletonThree = new SingletonThree();
    }

    // 方法没有同步
    public static SingletonThree getInstance() {
        return SingletonClassInstance.singletonThree;
    }

}

